home *** CD-ROM | disk | FTP | other *** search
/ IRIS Performer 2.2 Friends Demo / SGI IRIS Performer 2.2 Friends Demo.iso / friends / devices / BGSystems / examples / check_eprom.c next >
C/C++ Source or Header  |  1997-10-31  |  868b  |  46 lines

  1. /*
  2.  * Copyright 1994   BG Systems, Inc.
  3.  * check_rev.c
  4.  *
  5.  * routine that checks the EPROM revision
  6.  *
  7.  * Author         Date       Comments
  8.  * John Green     21-Oct-94  Author
  9.  * John Green     01-Feb-95  Final changes for revision 3.0 release
  10.  */
  11.  
  12. static char SccsId[] = "@(#)check_eprom.c    1.2 01 Feb 1995";
  13.  
  14. #include <stdio.h>
  15. #include <stdlib.h>
  16. #include <sys/types.h>
  17.  
  18. #include "lv3.h"
  19.  
  20. extern int open_lv(bglv *, char *, int);
  21. extern int check_rev(bglv *);
  22.  
  23. bglv bgdata;
  24.  
  25. static char Cpy[] = "Copyright (c), BG Systems";
  26.  
  27. int main(int argc, char **argv)
  28. {
  29.    int st;
  30. /*
  31.  * Open the serial port, and request a copyright string
  32.  */
  33.    printf("Attempting to open the serial port\n");
  34.    st = open_lv(&bgdata, argv[1], FB_NOBLOCK);
  35.  
  36.    if (st < 0)
  37.    {
  38.       printf("\tUnable to open port\nbye\n");
  39.       exit(1);
  40.    }
  41.    else
  42.       printf("\tOK\n");
  43.  
  44.    exit(0);
  45. }
  46.